package com.example.unisys.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.unisys.entity.StuChsCourse;
import com.example.unisys.dao.StuChsCourseMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class StuChsCourseService extends ServiceImpl<StuChsCourseMapper,StuChsCourse> {



    public int insert(StuChsCourse stuchscourse){
        return baseMapper.insert(stuchscourse);
    }

    public int insertSelective(StuChsCourse stuchscourse){
        return baseMapper.insertSelective(stuchscourse);
    }

   public List<StuChsCourse> getOverCourse( long exam_id){
        return baseMapper.getOverCourse(exam_id);
    }

   public List<StuChsCourse> getCourse( long exam_id){
        return baseMapper.getCourse(exam_id);
    }

   public StuChsCourse isStuCourse(long exam_id,String course_id){
        return baseMapper.isStuCourse(exam_id,course_id);
    }

    public int updateStatus(long exam_id,String course_id){
        return baseMapper.updateStatus(exam_id,course_id);
    }
}
